import sys,os

if len(sys.argv)<3:
    print 'Usage: python updateTag file.lst beg'
    exit(1)

fi=open(sys.argv[1],'r')
beg=int(sys.argv[2])
for line in fi:
    line=line.strip()
    cmd='curl http://genome.ddns.comp.nus.edu.sg:8002/tags/update/'+str(beg)+'/?assembly=hg19\&UCSC_name='+line
#    print cmd
    beg+=1
#    if beg>30:
#    	break
    os.system(cmd)
fi.close()
